package com.chushouya.product.dto.admin.skuevaluate;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * SKU估价项目列表展示DTO
 */
@Data
@ApiModel(value = "SKU估价项目列表展示DTO")
public class SkuEvaluateItemListDTO {

    @ApiModelProperty(value = "SKU估价项目ID")
    private Long skuItemId;

    @ApiModelProperty(value = "商品ID")
    private Long productId;

    @ApiModelProperty(value = "SKUID")
    private Long skuId;

    @ApiModelProperty(value = "项目ID")
    private Long itemId;

    @ApiModelProperty(value = "项目名称")
    private String itemName;

    @ApiModelProperty(value = "选择类型")
    private Integer selectType;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "状态")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 获取状态描述
     */
    public String getStatusDesc() {
        if (status == null) {
            return "未知";
        }
        switch (status) {
            case 0:
                return "禁用";
            case 1:
                return "启用";
            default:
                return "未知";
        }
    }

    /**
     * 获取选择类型描述
     */
    public String getSelectTypeDesc() {
        if (selectType == null) {
            return "未知";
        }
        switch (selectType) {
            case 0:
                return "单选";
            case 1:
                return "多选";
            default:
                return "未知";
        }
    }
}
